/**
 * Created by yy on 2017/7/20.
 */
$(function(){
    var secretaryCount = 0;
    var url = server + '/server/users/center/message.json';
    $.post(url, function(data){
        if (data.code == '12000'){
            alert("登录超时，请重新登录！");
            window.location.replace('../login.html');
        }
        var ctx = template('./personal-tpl', data);
        var ctx2 = template('./personal-tpl2',data);
        $("#personal").html(ctx);
        $("#personal2").html(ctx2);

        secretaryCount = data.data.secretaryCount;
        if(secretaryCount != 0){
            $('#hope a').addClass('hope-active');
        }
        else{
            $('#hope a').removeClass('hope-active');
        }

    });


});